

def myrange(stop):
    i = 0
    while i < stop:
        yield i
        i += 1

for x in myrange(5):
    print('x=', x)